using Gateway.Common.Enums;

namespace Gateway.IQuery.Webide.Result;

/// <summary>
/// 评测状态
/// </summary>
public class RuntimeStatusEnum : Enumeration<RuntimeStatusEnum, string>
{
    //正常运行
    public static readonly RuntimeStatusEnum Accepted = new RuntimeStatusEnum("AC", "答案正确，通过");
    public static readonly RuntimeStatusEnum WrongAnswer = new RuntimeStatusEnum("WA", "答案错误，不通过");

    //运行期间超出限制
    public static readonly RuntimeStatusEnum TimeLimitExceeded = new RuntimeStatusEnum("TLE", "运行时间过长，超时");
    public static readonly RuntimeStatusEnum MemoryLimitExceeded = new RuntimeStatusEnum("MLE", "运行中使用内存过大");

    //编译成功但运行出错
    public static readonly RuntimeStatusEnum RuntimeError = new RuntimeStatusEnum("RE", "运行时错误");

    //编译失败
    public static readonly RuntimeStatusEnum CompileError = new RuntimeStatusEnum("CE", "代码语法错误");

    public RuntimeStatusEnum(string value, string displayName) : base(value, displayName)
    {
    }
}